import { getCaptcha } from '@/apis/auth.js';

export const useCaptcha = () => {
  const uuid = ref('');
  const img = ref('');
  const doGetCaptcha = async () => {
    const ret = await getCaptcha();

    uuid.value = ret.data.uuid;
    img.value = ret.data.img;

    return ret;
  };

  doGetCaptcha();
  return {
    uuid,
    img,
    doGetCaptcha
  };
};
